package di

import (
	"fmt"
	backendBusinessOpportunity "git.mycaigou.com/gfyx/micro-gfyx-api/http_server/backend_controller/business_opportunity"
	backendCommon "git.mycaigou.com/gfyx/micro-gfyx-api/http_server/backend_controller/common"
	backendMarket "git.mycaigou.com/gfyx/micro-gfyx-api/http_server/backend_controller/market"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/aggregation"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/base"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/business_opportunity"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/clue"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/common"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/job_center"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/market"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/rpa"
	"git.mycaigou.com/gfyx/micro-gfyx-api/http_server/controller/subscription"
)

func (c *Inject) InjectController() {
	controllers := []interface{}{
		base.NewLoginController,
		base.NewLoginNewController,
		base.NewMenuController,
		base.NewOrgController,
		base.NewMsgController,
		base.NewRoleController,
		base.NewSiteController,
		base.NewUserController,
		base.NewUserNewController,
		business_opportunity.NewContactController,
		business_opportunity.NewCustomerController,
		business_opportunity.NewFormController,
		business_opportunity.NewReportFollowController,
		business_opportunity.NewOrderController,
		business_opportunity.NewProjectController,
		business_opportunity.NewBuildingController,
		business_opportunity.NewBidController,
		business_opportunity.NewCustomerGroupController,
		business_opportunity.NewMarketInsightController,
		business_opportunity.NewLandController,
		business_opportunity.NewStrategicMonitorController,
		clue.NewClueManageController,
		clue.NewCustomerManageController,
		//clue.NewCustomerController,
		//clue.NewCustomerPoolController,
		clue.NewReportController,
		common.NewCommonController,
		common.NewDmpReportController,
		common.NewFileController,
		common.NewMpController,
		common.NewOpenApiController,
		common.NewOptionController,
		common.NewVerifyCodeController,
		common.NewSiteAnnouncementController,
		job_center.NewJobCenterController,
		market.NewByCallBackController,
		market.NewOutboundAccountController,
		market.NewOutboundCrowdController,
		market.NewOutboundTaskController,
		rpa.NewRpaController,
		subscription.NewSubscriptionController,
		aggregation.NewStatisticsController,
		clue.NewCustomerMonitorController,
		backendBusinessOpportunity.NewCustomerGroupController,
		backendBusinessOpportunity.NewStrategicMonitorGroupController,
		backendCommon.NewOptionController,
		backendCommon.NewFileController,
		backendCommon.NewTenantController,
		backendCommon.NewSiteAnnouncementController,
		backendMarket.NewBackendOutboundTaskController,
	}
	var errs []error
	for _, controller := range controllers {
		err := c.Provide(controller)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectController #%+v\n", errs)
}
